<div class="bjui-pageContent">
    <form action="{:U('edit')}" class="pageForm" data-toggle="validate" method="post">
        <!-- 菜单id号 -->
        <input type="hidden" name="id" value="{:I('get.id')}">
        <table class="table table-condensed table-hover">
            <tbody>
            <tr>
                <td align="center"><h3>{$vo.title|default="添加分类"}</h3></td>
            </tr>
            <tr>
                <td>
                    <label class="control-label x150">所属父级：</label>
                    <select name="pid" data-toggle="selectpicker">
                        <volist name="catList" id="cat">
                        <option value="{$cat.id}" <?php echo $cat['id']==I('get.pid')?'selected':'';?>>{$cat.title}</option>
                        </volist>
                    </select>
                </td>
            </tr>
            <tr>
                <td>
                    <label class="control-label x150">
                        分类标识<span class="check-tips">（英文字母）</span>：
                    </label>
                    <input type="text" data-rule="required" size="20" name="name" value="{$vo.name}">
                </td>
            </tr>
            <tr>
                <td>
                    <label class="control-label x150">
                        分类名称<span class="check-tips">（中文）</span>：
                    </label>
                    <input type="text" data-rule="required" size="20" name="title" value="{$vo.title}">
                </td>
            </tr>
            <tr>
                <td>
                    <label class="item-label">发布内容：<span class="check-tips">（是否允许发布内容）</span></label>
                    <input type="radio" name="allow_publish" value="0" <if condition="$vo['allow_publish']==0">checked="checked"</if>>不允许
                    <input type="radio" name="allow_publish" value="1" <if condition="$vo['allow_publish']==1">checked="checked"</if>>仅允许后台
                    <input type="radio" name="allow_publish" value="2" <if condition="$vo['allow_publish']==2">checked="checked"</if>>允许前后台
                </td>
            </tr>
            <tr>
                <td>
                    <label class="control-label x150">允许文档类型：</label>
                    <volist name=":C('DOCUMENT_MODEL_TYPE')" id="type">
                        <input type="checkbox" name="type[]" value="{$key}"<if condition="in_array($key, $vo['type'])||empty($vo)">checked="checked"</if>>{$type}
                    </volist>
                </td>
            </tr>
            <tr>
                <td>
                    <label class="control-label x150">列表绑定文档模型：<span class="check-tips">（列表支持发布的文档模型）</span></label>
                    <volist name=":get_document_model()" id="list">
                        <input type="radio" name="model[]" value="{$list.id}" <if condition="in_array($list['id'], $vo['model'])||empty($vo)">checked="checked"</if>>{$list.title}
                    </volist>
                </td>
            </tr>
            <tr>
                <td>
                    <label class="control-label x150">排序：</label>
                    <input type="text" size="20" name="sort" value="{$vo.sort}">
                </td>
            </tr>

            <tr>
                <td>
                    <label class="control-label x150">
                        频道页模板：
                    </label>
                    <input type="text" size="20" name="template_index" value="{$vo.template_index}">
                </td>
            </tr>

            <tr>
                <td>
                    <label class="control-label x150">
                        列表页模板：
                    </label>
                    <input type="text" size="20" name="template_lists" value="{$vo.template_lists}">
                </td>
            </tr>

            <tr>
                <td>
                    <label class="control-label x150">
                        详情页模板：
                    </label>
                    <input type="text" size="20" name="template_detail" value="{$vo.template_detail}">
                </td>
            </tr>

            <tr>
                <td>
                    <label class="control-label x150">
                        编辑页模板：
                    </label>
                    <input type="text" size="20" name="template_edit" value="{$vo.template_edit}">
                </td>
            </tr>
<!--            <tr>
                <td>
                    <label class="control-label x150">子文档绑定绑定模型：<span class="check-tips">（子文档支持发布的文档模型）</span></label>
                    <volist name=":get_document_model()" id="list">
                        <input type="checkbox" name="model_sub[]" value="{$list.id}">{$list.title}
                    </volist>
                </td>
            </tr>-->
            </tbody>
        </table>
    </form>
</div>
<div class="bjui-pageFooter">
    <ul>
        <li><button type="button" class="btn-close">关闭</button></li>
        <li><button type="submit" class="btn-default">保存</button></li>
    </ul>
</div>